<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/template.xhtml">
	<ui:define name="title">Login</ui:define>
	<ui:define name="body">
		<p>Login using your eID card. If you are not yet known as
			administrator, you will be registered for admin approval.</p>
		<script type="text/javascript" src="./deployJava.js"></script>
		<script type="text/javascript" src="./deploy-eid-applet.js"></script>
		<script type="text/javascript">
			var attributes = {
				code : 'be.fedict.eid.applet.Applet.class',
				archive : 'eid-applet-package-${eid-applet.version}.jar',
				width : 600,
				height : 300,
				mayscript : 'true'
			};
			var parameters = {
				TargetPage : 'javascript:login();',
				AppletService : 'applet-service-authentication;jsessionid=#{facesContext.externalContext.getSession(false).id}'
			};
			deployJavaEIDApplet.runApplet(attributes, parameters);
		</script>
		<script type="text/javascript">
			function login() {
				document.getElementById("loginForm:submit").click();
			}
		</script>
		<h:form id="loginForm">
			<h:commandButton style="display:none" id="submit"
				action="#{${admin-control-cdi-components-prefix}AuthenticationController.login}"
				value="Login" />
		</h:form>
	</ui:define>
</ui:composition>
